<script type="text/javascript">
  function timedRefresh(timeoutPeriod) {
    setTimeout("location.reload(true);",timeoutPeriod);
  }
</script>
<center>
<table width="100%">
<tr>
  <td valign="top">
    <table width="90%" style="border: 3px solid black; font-size: 30px;">
    <tr align="center" style="border: 3px solid black;" bgcolor="#cccccc">
      <th>Player</th>
      <th>Buy RawMat</th>
      <th>Produce</th>
    </tr>
    <%@players.each_with_index do |p,i|%>
    <%if i%2==0%>
    <tr align="center">
    <%else%>
    <tr align="center" bgcolor="#CCEEFE">
    <%end%>
      <td align="left"><%=p.name%></td>
      <%pb = PlayerBalance.find(:first, :conditions=>["player_id=? AND year=?", p.id, p.game.current_year])%>
      <td>
        <%if pb.rawmat_unit>0%><img src="/images/check.png" width="35px"/><%end%>
      </td>
      <td>
        <%if pb.onprocess_inventory_unit>0%>
          <img src="/images/check.png" width="35px"/>
          <%if pb.onprocess_inventory_unit==pb.rawmat_unit%><img src="/images/check.png" width="35px"/><%end%>
        <%end%>
      </td>
    </tr>
    <%end%>
  </table>
  </td>
</tr>
</table>
</center>
<script type="text/javascript">
  timedRefresh(10000);
</script>